local HeroSimple = require("hero.Proto").HeroSimple
local HeroStatic = require("hero.Proto").HeroStatic
local HeroDynamic = require("hero.Proto").HeroDynamic
local SkillNet = require("hero.Proto").SkillNet
local ItemData = require("bag.Proto").ItemData
local RoleBase = require("role.Proto").RoleBase
local FuwenMsg = require("hero.Proto").FuwenMsg 

-- 竞技场列表查询
JJCActNet = {
	{"id",			1,		"byte"},	    -- 活动id
	{"panelID",		1,		"short"},	    -- 面板Id
	{"bg",			1,		"byte"},	    -- 背景图
	{"name",		1,		"string"},		-- 活动名
	{"desc",		1,		"string"},	    -- 开启条件/活动说明
	{"state",		1,		"byte"},	    -- 活动状态 0-未开放 1-常驻活动 2-赛季结束倒计时 3-新赛季开始倒计时 
	{"leftTime",	1,		"int"},		    -- 剩余时间 秒(常驻活动用不到倒计时)
	{"reward",		5,		ItemData},		-- 奖励展示
	{"isRed",		1,		"byte"},		-- 是否显示红点
	{"args",		3,		"int"},			-- 其它额外参数
}

CG_JJC_ACT_LIST = {}
GC_JJC_ACT_LIST = {
	{"list",		10,		JJCActNet},
	{"jjcDouble",    1,     "byte"}, 
    {"worshipCnt",1,"int"},             -- 膜拜总次数
}

-- 跨服争霸列表查询
CG_JJC_MIDDLE_ACT_LIST = {}
GC_JJC_MIDDLE_ACT_LIST = {
	{"list",		10,		JJCActNet},
}


-- 竞技场基础数据查询
JJC_MEMBER = {
	{"rank",         1,       "int"},		-- 排名
	{"jifen",        1,       "int"},		-- 积分
	{"worshipCnt",   1,       "int"},		-- 膜拜次数
	{"worshipState",   1,     "byte"},		-- 膜拜状态，0已膜拜  1 未膜拜
    {"roleBase",     1,       RoleBase},      --
}
JJC_BOX = {
    {"item",5,ItemData},                -- 奖励
    {"reachCnt",1,"byte"},              -- 达标次数
    {"state",1,"byte"},                 -- 状态  0未达成  1可领取 2已领取
}

-- 冠军联赛查询
CG_JJC_QUERY = {
}

GC_JJC_QUERY = {
	{"ownRank",             1,      "int"},		    -- 排名
	{"ownJifen",            1,      "int"},		    -- 积分
	{"defZDL",              1,      "int"},		    -- 战斗力
	{"atkZDL",              1,      "int"},		    -- 战斗力
	{"leftSec",             1,      "int"},		    -- 剩余时间
    {"dotList",             3,      "byte"},        -- 红点列表 1挑战  2排行榜  3战斗记录
    {"jjcBox",              10,      JJC_BOX},      -- 赛季宝箱
    {"challengeCnt",        1,      "int"},         -- 挑战次数
    {"challengeCostItem",   1,      ItemData},      -- 挑战花费道具
    {"isQuick",             1,      "byte"},        -- 是否跳过战斗
}

-- 竞技场对战记录查询
CG_JJC_RECORD_QUERY = {}

JJC_RECORD = {
    {"identity",        1,      "string"},	-- 这里只是名字叫identity 其实是每次战斗记录里面自己的_id
    {"roleBase",        1,      RoleBase},  -- 进攻角色信息
	{"result",          1,      "byte"},    -- 战果 
	{"jifenChange",     1,      "int"},		-- 积分改变  
	{"time",            1,      "int"},		-- 战斗时间
}

GC_JJC_RECORD_QUERY = {
	{"recordList",      30,      JJC_RECORD},  -- 对战记录
    {"leftFreeCnt",		1,		"byte"},    -- 今日剩余免费次数
}

-- 查询奖励
CG_JJC_REWARD_QUERY = {
	{"type",          1,        "byte"}, -- 1每日奖励 2赛季奖励
}

JJC_REWARD_ITEM = {
	{"maxRank",		1,		"int"},
	{"minRank",		1,		"int"},
	{"items",		4,		ItemData},
}

GC_JJC_DAY_REWARD_QUERY = {
	{"type",            1,        "byte"},            -- 1每日奖励 2赛季奖励
	{"rank",	        1,        "int"},             -- 当日排名
	{"leftSec",		    1,        "int"},		      -- 每日奖励剩余时间
	{"list",            20,        JJC_REWARD_ITEM},  -- 每日奖励列表 
	{"canGet",          4,        ItemData},          -- 自己能获得的奖励
}

-- 竞技场对手查询
CG_JJC_TARGET_FIND = {
    {"type",1,"byte"},                  -- 1 主动 0 被动
}

GC_JJC_TARGET_FIND = {
	{"targetList",      3,      JJC_MEMBER},
	{"leftFreeCnt",		1,		"byte"},    -- 今日剩余免费次数
}

-- 竞技场战斗后奖励
-- 竞技场战斗后数据
GC_JJC_AFTER_FIGHT = {
	{"result",			1,		"byte"},        -- 胜负结果  1胜2负
	{"atkPoint",		1,		"short"},       -- 进攻方分数
	{"atkPointChange",	1,		"short"},       -- 进攻方分数变化
	{"atkRole",		    1,		RoleBase},      -- 进攻方rolebase
	{"defRole",	        1,		RoleBase},      -- 进攻方rolebase
	{"defPoint",		1,		"short"},       -- 防守方分数
	{"defPointChange",	1,		"short"},       -- 防守方分数变化
	{"items",			3,		ItemData},      -- 奖励道具
    {"double",			1,		"byte"},        -- 是否双倍
}	


-- 获取赛季宝箱奖励
CG_JJC_CHAMPION_BOX_GET = {
    {"index",1,"byte"},             -- 箱子索引
}

-- 膜拜
CG_JJC_CHAMPION_WORSHIP = {
    {"uuid",1,"string"},            -- 被膜拜的玩家UUid
}

-- 膜拜成功
GC_JJC_CHAMPION_WORSHIP = {
    {"worshipCnt",1,"int"},         -- 被膜拜总次数
    {"dot",1,"byte"},               -- 是否还有膜拜红点  0  无 1 有
}

-- 排行榜查询
CG_JJC_CHAMPION_BILLBOARD_QUERY = {
}

GC_JJC_CHAMPION_BILLBOARD_QUERY = {
    {"topList",     100,    JJC_MEMBER},        -- 排行榜前100名
    {"ownRank",     1,      JJC_MEMBER},        -- 自己的数据
    {"dotList",     3,      "byte"},            -- 红点列表 1挑战  2排行榜  3战斗记录
}

-- 被挑战
GC_JJC_CHAMPION_BE_CHALLENGE = {}

-- 赛季结束 收到这个协议时 客户端如果打开了竞技场面板 需要关闭竞技场面板
GC_JJC_SEASON_END = {}

